var express = require('express');
var router = express.Router();
var query = require('./Database');

/* GET home page. */
router.get('/', function(req, res, next) {
    res.render('ProLetterDetail', {});
});
router.post('/letterdetail',async (req,res)=>{
    console.log("--------------");
    console.log(req.body);
    let list = req.body;
    let rows = await query("select * from letter where id = "+ list.id);
    let data = [{code:100},rows];
    res.send(data);
});
module.exports = router;